package com.lepu.app.fun.index.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

@SuppressWarnings("serial")
public class BeanIndexFileLog implements Serializable{
   public int HRID;
   public String UserID;
   public String Weight;
   public String SBP;
   public String DBP;
   public String HeartRate;
   public String RecordDate;
   public String RecordCreateTime;
   public String BloodGlucose ;
   public int BloodGlucoseType ;
   public String Description ;
   
   public static ArrayList<BeanIndexFileLog> parseListInfo(String dataString)
	{
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONArray jsonArray = obj1.getJSONArray("ListInfo");
			
			result = jsonArray.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		Gson gson = new Gson();
		ArrayList<BeanIndexFileLog> dataList = gson.fromJson(result,new TypeToken<List<BeanIndexFileLog>>() {}.getType());
		return dataList;
	}
   
}
